package com.learn.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 *
 * @author: hbliy
 * @date: 2025/11/6 14:56
 */
@Configuration
public class AppConfig {

    /**
     * 当您想要将属性绑定到您无法控制的第三方组件时，这样做可能特别有用
     * @return
     */
    @Bean
    @ConfigurationProperties(prefix = "another")
    public AnotherComponent anotherComponent() {
        return new AnotherComponent();
    }
}
